package com.hxd.charitysystem.bean

import com.google.gson.Gson

/**
 * 项目名：    CharitySystem
 * 包名：      com.hxd.charitysystem.item_card_home.CardItemAdapter
 * 文件名:     CardItem
 * 创建者:     HXD
 * 创建时间:   2019/4/29 10:28
 * 描述:       首页众筹项目
 */

data class HomeCardItemListBean(val msg: ArrayList<CardItem>, val status: Int) {

    data class CardItem(
        val projectId:String = "",
        val username: String = "",
        val userHeader: String = "",
        val title: String = "",
        val desc: String = "",
        val targetAmount: Float = 0.0f,
        val address: String = "",
        val helpCount: Int = 0,
        val raisedAmount: Float = 0.0f,
        val type: String = "",
        val assistantImages: ArrayList<String>? = null,
        val status:Int = 0
    ){
        fun CardItemToJson():String{
            val gson = Gson()
            val cardItem = CardItem(projectId, username, userHeader, title, desc, targetAmount, address, helpCount, raisedAmount, type,assistantImages, status)
            return gson.toJson(cardItem)
        }
    }
}



